$.ajaxSetup({
    beforeSend:function(){
    },
    complete:function(xhr,status){
        if(xhr.responseJSON.code=='401'){
            layer.msg(xhr.responseJSON.message);
            setTimeout(function(){  top.window.location.href=top.nginxpath+top.ViewContextPath;}, 2000);
        }
    }
});